3.5.84 \(\int \frac {\cot ^2(e+f x)}{(a-a \sin ^2(e+f x))^{3/2}} \, dx\) [484]

Optimal. Leaf size=63 \[ \frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}} \]

[Out]

arctanh(sin(f*x+e))*cos(f*x+e)/a/f/(a*cos(f*x+e)^2)^(1/2)-cot(f*x+e)/a/f/(a*cos(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {3255, 3286, 2701, 327, 213} \begin {gather*} \frac {\cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^2/(a - a*Sin[e + f*x]^2)^(3/2),x]

[Out]

(ArcTanh[Sin[e + f*x]]*Cos[e + f*x])/(a*f*Sqrt[a*Cos[e + f*x]^2]) - Cot[e + f*x]/(a*f*Sqrt[a*Cos[e + f*x]^2])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 327

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^n
)^(p + 1)/(b*(m + n*p + 1))), x] - Dist[a*c^n*((m - n + 1)/(b*(m + n*p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2701

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 3255

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*cos[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0]

Rule 3286

Int[(u_.)*((b_.)*sin[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Sin[e + f*x], x]}, Di
st[(b*ff^n)^IntPart[p]*((b*Sin[e + f*x]^n)^FracPart[p]/(Sin[e + f*x]/ff)^(n*FracPart[p])), Int[ActivateTrig[u]
*(Sin[e + f*x]/ff)^(n*p), x], x]] /; FreeQ[{b, e, f, n, p}, x] &&  !IntegerQ[p] && IntegerQ[n] && (EqQ[u, 1] |
| MatchQ[u, ((d_.)*(trig_)[e + f*x])^(m_.) /; FreeQ[{d, m}, x] && MemberQ[{sin, cos, tan, cot, sec, csc}, trig
]])

Rubi steps

\begin {align*} \int \frac {\cot ^2(e+f x)}{\left (a-a \sin ^2(e+f x)\right )^{3/2}} \, dx &=\int \frac {\cot ^2(e+f x)}{\left (a \cos ^2(e+f x)\right )^{3/2}} \, dx\\ &=\frac {\cos (e+f x) \int \csc ^2(e+f x) \sec (e+f x) \, dx}{a \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cos (e+f x) \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\csc (e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}}\\ &=-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cos (e+f x) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}}\\ &=\frac {\tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}-\frac {\cot (e+f x)}{a f \sqrt {a \cos ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
time = 0.06, size = 44, normalized size = 0.70 \begin {gather*} -\frac {\cot (e+f x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\sin ^2(e+f x)\right )}{a f \sqrt {a \cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^2/(a - a*Sin[e + f*x]^2)^(3/2),x]

[Out]

-((Cot[e + f*x]*Hypergeometric2F1[-1/2, 1, 1/2, Sin[e + f*x]^2])/(a*f*Sqrt[a*Cos[e + f*x]^2]))

________________________________________________________________________________________

Maple [A]
time = 9.73, size = 65, normalized size = 1.03

method result size
default \(-\frac {\cos \left (f x +e \right ) \left (2+\sin \left (f x +e \right ) \left (\ln \left (\sin \left (f x +e \right )-1\right )-\ln \left (1+\sin \left (f x +e \right )\right )\right )\right )}{2 a \sin \left (f x +e \right ) \sqrt {a \left (\cos ^{2}\left (f x +e \right )\right )}\, f}\) \(65\)
risch \(-\frac {2 i \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{a \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}+\frac {2 \ln \left ({\mathrm e}^{i f x}+i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, a}-\frac {2 \ln \left ({\mathrm e}^{i f x}-i {\mathrm e}^{-i e}\right ) \cos \left (f x +e \right )}{f \sqrt {\left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{2} a \,{\mathrm e}^{-2 i \left (f x +e \right )}}\, a}\) \(173\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-1/2/a*cos(f*x+e)*(2+sin(f*x+e)*(ln(sin(f*x+e)-1)-ln(1+sin(f*x+e))))/sin(f*x+e)/(a*cos(f*x+e)^2)^(1/2)/f

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 240 vs. \(2 (64) = 128\).
time = 0.54, size = 240, normalized size = 3.81 \begin {gather*} \frac {{\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right ) - {\left (\cos \left (2 \, f x + 2 \, e\right )^{2} + \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, \cos \left (2 \, f x + 2 \, e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} - 2 \, \sin \left (f x + e\right ) + 1\right ) - 4 \, \cos \left (f x + e\right ) \sin \left (2 \, f x + 2 \, e\right ) + 4 \, \cos \left (2 \, f x + 2 \, e\right ) \sin \left (f x + e\right ) - 4 \, \sin \left (f x + e\right )}{2 \, {\left (a \cos \left (2 \, f x + 2 \, e\right )^{2} + a \sin \left (2 \, f x + 2 \, e\right )^{2} - 2 \, a \cos \left (2 \, f x + 2 \, e\right ) + a\right )} \sqrt {a} f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

1/2*((cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 - 2*cos(2*f*x + 2*e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 +
2*sin(f*x + e) + 1) - (cos(2*f*x + 2*e)^2 + sin(2*f*x + 2*e)^2 - 2*cos(2*f*x + 2*e) + 1)*log(cos(f*x + e)^2 +
sin(f*x + e)^2 - 2*sin(f*x + e) + 1) - 4*cos(f*x + e)*sin(2*f*x + 2*e) + 4*cos(2*f*x + 2*e)*sin(f*x + e) - 4*s
in(f*x + e))/((a*cos(2*f*x + 2*e)^2 + a*sin(2*f*x + 2*e)^2 - 2*a*cos(2*f*x + 2*e) + a)*sqrt(a)*f)

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 66, normalized size = 1.05 \begin {gather*} -\frac {\sqrt {a \cos \left (f x + e\right )^{2}} {\left (\log \left (-\frac {\sin \left (f x + e\right ) - 1}{\sin \left (f x + e\right ) + 1}\right ) \sin \left (f x + e\right ) + 2\right )}}{2 \, a^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(a*cos(f*x + e)^2)*(log(-(sin(f*x + e) - 1)/(sin(f*x + e) + 1))*sin(f*x + e) + 2)/(a^2*f*cos(f*x + e)
*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot ^{2}{\left (e + f x \right )}}{\left (- a \left (\sin {\left (e + f x \right )} - 1\right ) \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**2/(a-a*sin(f*x+e)**2)**(3/2),x)

[Out]

Integral(cot(e + f*x)**2/(-a*(sin(e + f*x) - 1)*(sin(e + f*x) + 1))**(3/2), x)

________________________________________________________________________________________

Giac [A]
time = 0.69, size = 70, normalized size = 1.11 \begin {gather*} \frac {\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{a^{\frac {3}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right )} + \frac {1}{a^{\frac {3}{2}} \mathrm {sgn}\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1\right ) \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^2/(a-a*sin(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

1/2*(tan(1/2*f*x + 1/2*e)/(a^(3/2)*sgn(tan(1/2*f*x + 1/2*e)^4 - 1)) + 1/(a^(3/2)*sgn(tan(1/2*f*x + 1/2*e)^4 -
1)*tan(1/2*f*x + 1/2*e)))/f

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\mathrm {cot}\left (e+f\,x\right )}^2}{{\left (a-a\,{\sin \left (e+f\,x\right )}^2\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^2/(a - a*sin(e + f*x)^2)^(3/2),x)

[Out]

int(cot(e + f*x)^2/(a - a*sin(e + f*x)^2)^(3/2), x)

________________________________________________________________________________________